package org.hk.proxy.server.utils;

import cn.hutool.core.util.StrUtil;

public class WebUtils {
    public static String parsePath(String uri){
        uri=uri.equals("/")?"/index.html":uri;
        return uri;
    }
    public  static String getToken(String cookies){
        if(StrUtil.isNotBlank(cookies)){
            for(String cookie : cookies.split(";")){
                if(cookie.contains("token=")){
                    return cookie.replace("token=","");
                }
            }
        }
        return "";
    }
}
